home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / c / C_V43-DT.readme < prev    next >
Text File  |  1998-10-31  |  9KB  |  222 lines

  1. Short:    How: OS3 V40/43 PicDatatype in 100% C
  2. Author:   Andreas_Kleinert@t-online.de
  3. Uploader: Andreas_Kleinert@t-online.de
  4. Type:     dev/c
  5.  
  6.  
  7.   samplePNM.datatype and source-code V43.20 (4.9.98)
  8.   (C) 1996-97 by Andreas R. Kleinert. All rights reserved.
  9.  
  10.   ---
  11.   This small sample datatype source code demonstrates, how to completely
  12.   write an Amiga OS 3 datatype (V40/V43) without any assembler stubs
  13.   or compiler/linker tricks in PURE C source code (currently SAS/C-based:
  14.   see Aminet:dev/c/CLib37x.LHA on how to adjust for some other compilers).
  15.  
  16.   You may e.g. use this example source code to write more portable
  17.   Amiga OS 3 datatypes to allow easier porting of these
  18.   to other Amiga OS-derived operating systems, or the native
  19.   OS of an upcoming PowerPC Amiga.
  20.  
  21.   Translate your 68k-assembler datatype startup-codes smartly
  22.   to C by simply using this source-code as an advice how to do it.
  23.  
  24.  
  25.   As a common case, a datatype of class picture, supporting
  26.   PNM-PGM (P5) and PNM-PPM (P6) has been used as an example.
  27.  
  28.   With picture.datatype V40-42 only PGM is supported,
  29.   and with picture.datatype V43 reading of PPM is offered as well,
  30.   while encountering an PGM file under V43 causes a fallback to V40
  31.   routines (could have been done differently, but was not necessary
  32.   here just for demonstration).
  33.  
  34.   For testing this datatype, simply use a tool from the NetPBM package
  35.   (or maybe for example a tool supporting superview.library) and save
  36.   a graphics in the binary PGM or PPM format (P5/P6 of the PNM series).
  37.  
  38.   Then install this datatype and try loading the file via MultiView.
  39.   Should work fine.
  40.  
  41.   ---
  42.   Feel free to use this source for own projects.
  43.  
  44.   It is allowed to be spread and distributed anywhere, as far
  45.   as my consent is concerned.
  46.  
  47.   Amiga Technologies, or the current owner of the technologie,
  48.   is allowed to always put this source on their newest
  49.   Developer CD-ROM.
  50.  
  51.   Thanks and credits will always be appreciated - for example,
  52.   you MAY, but NEED NOT:
  53.   give me credits in your program's docs, send me keyfiles for
  54.   your programs using the library, and so on.
  55.   But that's simply voluntarily.
  56.  
  57.   This work was only roughly inspired by David Junod's original
  58.   example source codes for datatypes.
  59.  
  60.  
  61.  
  62.   ** General PerSuaSiVe SoftWorX WWW Support Site is http://wdo.de/ark/
  63.   ** - actually redirected to http://home.t-online.de/home/Andreas_Kleinert/
  64.  
  65.    _________________________________________________________
  66.   |      You may reach me the following way.                |
  67.   |    Send bug-reports, money or whatever to:              |
  68.   |---------------------------------------------------------|
  69.   |        * SuperView Development & Registration *         |
  70.   |          * DRAFU Development & Registration *           |
  71.   |       * Image Engineer Registration Site Europe *       |
  72.   |                                                         |
  73.   |                                                         |
  74.   |                  PerSuaSiVe SoftWorX                    |
  75.   |                                                         |
  76.   |                  Andreas R. Kleinert                    |
  77.   |                  Sandstrasse 1                          |
  78.   |                  D-57072 Siegen                         |
  79.   |                  Germany, Europe                        |
  80.   |                                                         |
  81.   | Any snail mail to the old address will still be routed. |
  82.   |                                                         |
  83.   |                  Phone:  +49-271-22869 also FAX + AM    |
  84.   |                                                         |
  85.   |                  Weekdays after 18.00h.                 |
  86.   |                                                         |
  87.   |         When calling via phone you may leave a message, |
  88.   |         if I'm not available - but don't expect me      |
  89.   |         calling back to USA, Australia, ... since       |
  90.   |         german phone rates are HIGHLY expensive.        |
  91.   |_________________________________________________________|
  92.  
  93.   EMail:
  94.  
  95.         Please send binaries via ARK@News.wwbnet.de, and keep
  96.         them smaller than 16 KB - otherwise ask before.
  97.         Please think twice before sending them - my postbox
  98.         is not unlimited in size.
  99.  
  100.         * Do not send binaries via Fido or Fido-Gates ! *
  101.  
  102.            - Fido   Andreas Kleinert 2:2457/350.18
  103.            - Usenet
  104.               >>>   Andreas_Kleinert@t-online.de     (T-Online)
  105.                     ARK@News.wwbnet.de               (Z-Netz)
  106.                     ARK@superview.ftn.neckar-alb.de  (Fido-Gate)
  107.                     Andreas_Kleinert@gmx.de          (GMX)
  108.  
  109.              (note, that mail sent to @gmx.de currently will be
  110.               forwarded to @t-online.de - so, as long as it works,
  111.               try to address the latter directly)
  112.  
  113.            - If nothing else works, try one of these public
  114.              Fido-Usenet gateways:
  115.  
  116.                In Germany:
  117.                  Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org
  118.  
  119.                From USA or elsewhere:
  120.                  Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org
  121.  
  122.  
  123.  Known Bugs:        - some versions of DOpus and all Installer versions
  124.                       can't fetch the version information from the
  125.                       library binary due to some bugs in their code.
  126.                       Newer DOpus versions have this fixed and C:Version
  127.                       for example did that task always.
  128.  
  129.                       See also: Aminet:dev/GetVersion.lha for a fix.
  130.  
  131.  History:
  132.  
  133.  V43.20 (4.9.97):  - fixed dispatcher again
  134.                      (-> Axel Doerfler)
  135.  
  136.  V43.10 (29.9.97): - added note about GetVersion.lha
  137.                    - rewrote Dispatch() routine completely,
  138.                      implemented new routines derived
  139.                      from Roland Mainz' improved sample code
  140.                    - DTM_WRITE now can be forced to its
  141.                      old behaviour by specifying the hidden
  142.                      prefs option "OLD_DTM_WRITE"
  143.                      (IFF-ILBM then will be written without
  144.                       any error code given because of
  145.                       unsupported DTWR_RAW)
  146.                    - etc.
  147.  
  148.  V43.9 (29.6.97) : - fixed memory bug-fix (argh)
  149.                      (-> Gunter Nikl)
  150.  
  151.  V43.8 (24.6.97) :  - again removed class dispatcher code (refresh bug)
  152.                     - added "known bugs" section
  153.                     - LibInit now delocates library base on error
  154.                       (NULL return)
  155.                       (-> Gunter Nikl)
  156.  
  157.  V43.7 (14.6.97) :  - fixed ftn-email address
  158.                     - updated class dispatcher
  159.                       (-> Roland Mainz)
  160.  
  161.  V43.6 (27.3.97) :  - did some finetuning
  162.                     - now can simply be turned into a V40 datatype
  163.                       by removing a #define (and/or the corresponding
  164.                       parts of the code)
  165.  
  166.  V43.5 (25.1.97) :  - now explicitely checks for DTA_SourceType == DTST_File
  167.                     - small changes
  168.                     - updated email information
  169.  
  170.  V43.4 (3.1.97) :   - fixed PRI entry in resident part
  171.                     - slightly changed SCOPTIONS
  172.                     - fixed some style things (APTR and library casts)
  173.                     - fixed a bug: bitmap would not have been freed
  174.                       on temporary-buffer allocation error
  175.                     - added note about library opening to L_OpenLibs()
  176.  
  177.  V43.3 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
  178.                     - made some workarounds compiler sensitive
  179.                     - redone all with SAS/C V6.57
  180.  
  181.  V43.2 (3.11.96)  : - there was a FreeBitMap() call missing (oops)
  182.                     - it's samplePNM.dt, not samplePNG.dt ;-)
  183.  
  184.  V43.1 (25.10.96) : - added picture datatype V43 support
  185.                     - thus added support for 24 Bit PPM (P6),
  186.                       since PGM only has 256 grayscales
  187.                     - thus renamed to samplePNM.datatype
  188.  
  189.  V40.3 (13.9.96)  : - fixed more "style" things
  190.  
  191.  V40.2 (5.9.96)   : - fixed some "style" things
  192.  
  193.  V40.1 (2.9.96)   : - first release
  194.  
  195.  ---
  196.  All mentioned trademarks are subjec